//
//  SgyListTableViewCell.m
//  SGYPhotoPicker
//
//  Created by ShiMac on 15/6/14.
//  Copyright (c) 2015年 guoyan. All rights reserved.
//

#import "SgyListTableViewCell.h"

@implementation SgyListTableViewCell

- (void)awakeFromNib {
    // Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        
        self.imageV1=[[UIImageView alloc]initWithFrame:CGRectZero];
        self.imageV2=[[UIImageView alloc]initWithFrame:CGRectZero];
        self.imageV1.contentMode=UIViewContentModeScaleAspectFill;
        self.imageV1.clipsToBounds=YES;
        
        self.imageV3=[[UIImageView alloc]initWithFrame:CGRectZero];

        self.label=[[UILabel alloc]initWithFrame:CGRectZero];
        
        [self addSubview:self.imageV1];
        [self addSubview:self.imageV2];
        [self addSubview:self.imageV3];
        [self sendSubviewToBack:self.imageV2];
        [self sendSubviewToBack:self.imageV3];
        [self addSubview:self.label];
        
        self.videoIcon=[[UIImageView alloc]initWithFrame:CGRectZero];
        self.videoIcon.image=[UIImage imageNamed:@"GMVideoIcon"];
        self.videoIcon.hidden=YES;
        [self.imageV1 addSubview:self.videoIcon];
        
    }
    return self;
}


-(void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.imageV1.frame=CGRectMake(10, 10, self.frame.size.height-20, self.frame.size.height-20);
    self.imageV2.frame=CGRectMake(12, 8, self.frame.size.height-24, self.frame.size.height-24);
    self.imageV3.frame=CGRectMake(14, 6, self.frame.size.height-28, self.frame.size.height-28);
    self.label.frame=CGRectMake(CGRectGetMaxX(self.imageV1.frame)+10 , 10, 200, self.frame.size.height-20);
    self.videoIcon.frame=CGRectMake(2, self.imageV1.frame.size.height-12, 15, 8);
}



@end
